<?php

namespace app\admin\controller;

use think\Request;

class Harmpest extends Harm
{

    public function __construct() {
        parent::__construct();

        $this->model = 'Harm';
        $this->addView = 'harm:add';
        $this->editView = 'harm:edit';
        $this->indexView = 'harm:list';
        $this->type = 2;

        $defaultWhere = [];
        $defaultWhere['type'] = $this->type;
        $this->defaultWhere = $defaultWhere;

        $this->redirect = 'admin/harmpest/index';
        $this->searchFields = [
            'name' => [
                'label'     => '名称',
                'field'     => 'name',
                'type'      => 'text',
                'disabled'  => false,
                'condition' => 'like'
            ],
        ];
        $this->assign('type',$this->type);
    }

}
